package java_06_stream;

import java.util.HashSet;
import java.util.Set;

public class java_05 {
	public static void main(String[] args) {
		int[] arr1={1,2,3,3};
		int[] arr2={6,4,5,2,3};
		removeint(arr1, arr2);
	}
	private static void removeint(int[] arr1, int[] arr2) {
		HashSet<Integer> set1 = new HashSet<>();
		for(int i:arr1){
			set1.add(i);
		}
		Set<Integer> set2 = new HashSet<>();
		for (int num : arr2) {
			set2.add(num);
		}
		set1.removeAll(set2);
		set1.stream().mapToInt(s->s).forEach(s->System.out.print(s+" "));
	}
}